<script>
	export default {
		onLaunch: function(options) {
			console.log('App Launch')
			// 在小程序启动时获取二维码参数
			console.log('App Launch Options:', options);
			// 解析scene参数，如果二维码中携带了参数
			if (options.scene) {
				const scene = decodeURIComponent(options.scene);
				console.log('Scene 参数:', scene);
				uni.setStorageSync("fromid", scene.split('_')[1]);
				//uni.setStorageSync("fromid", 789);
			}
			else{
				uni.setStorageSync("fromid", '');
			}
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
	@import "@/uni_modules/uview-ui/index.scss";

	/*每个页面公共css */
	body {
		font-family: PingFang SC;
		background: #1F1F1F;
		color: #fff;
	}

	page {
		background: #1F1F1F;
		color: #fff;
	}
</style>